package com.aydqyy.springbootstart.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.ibatis.annotations.ConstructorArgs;

import java.beans.ConstructorProperties;
import java.util.List;

@Data
public class PageResult<T> {
    // 数据列表
    private List<T> data;
    // 总数
    private long total;
    // 当前页码
    private long pageNum;
    // 每页大小
    private long pageSize;

    public PageResult(List<T> data, long total, long pageNum, long pageSize) {
        this.data = data;
        this.total = total;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
    }
}